package com.five.taotao.entity;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

import java.io.Serializable;
import java.util.List;

/**
 * Created by asus on 2016/11/4.
 */
public class Product implements  Serializable{

    /**
     * name : ALOVIVI 皇后四效合一卸妆水(500ml)
     * price : 109
     * introduce : 深层清洁，无任何残留，专注眼部清洁，无任何刺激性。
     * url : http://img.cdn.daling.com/data/files/mobile/2015/11/26/14485342574502.jpg
     * vipprice : 49.9
     * sid1 : {"id":0,"name":"DHC化妆品专场","url":"http://img.cdn.daling.com/data/files/mobile/2015/11/26/14485342574502.jpg"}
     * pid1 : {"id":0,"name":"卸妆","url":"http://img.cdn.daling.com/data/files/mobile/2015/11/26/14485342574502.jpg"}
     * stock : 6002
     * productId : 1000100
     */

    private List<ListBean> list;

    public List<ListBean> getList() {
        return list;
    }

    public void setList(List<ListBean> list) {
        this.list = list;
    }

    @DatabaseTable(tableName = "ProductListBean")
    public static class ListBean implements Serializable{

        @DatabaseField(generatedId = true)//删除所有数据时，需要加入主键，
        private int id;

        @DatabaseField
        private String name;
        @DatabaseField
        private int price;
        @DatabaseField
        private String introduce;
        @DatabaseField
        private String url;
        @DatabaseField
        private double vipprice;
        /**
         * id : 0
         * name : DHC化妆品专场
         * url : http://img.cdn.daling.com/data/files/mobile/2015/11/26/14485342574502.jpg
         */

        private Sid1Bean sid1;
        /**
         * id : 0
         * name : 卸妆
         * url : http://img.cdn.daling.com/data/files/mobile/2015/11/26/14485342574502.jpg
         */

        private Pid1Bean pid1;

        @DatabaseField
        private int stock;
        @DatabaseField
        private String productId;
        @DatabaseField
        private int collected;//1表示已收藏；0表示没有收藏。

        private int num;//购买数量

        public ListBean() {
        }

        public ListBean(String name, int price, String introduce, String url, double vipprice, Sid1Bean sid1, Pid1Bean pid1, int stock, String productId) {
            this.name = name;
            this.price = price;
            this.introduce = introduce;
            this.url = url;
            this.vipprice = vipprice;
            this.sid1 = sid1;
            this.pid1 = pid1;
            this.stock = stock;
            this.productId = productId;
        }

        public int getNum() {
            return num;
        }

        public void setNum(int num) {
            this.num = num;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public int getCollected() {
            return collected;
        }

        public void setCollected(int collected) {
            this.collected = collected;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getPrice() {
            return price;
        }

        public void setPrice(int price) {
            this.price = price;
        }

        public String getIntroduce() {
            return introduce;
        }

        public void setIntroduce(String introduce) {
            this.introduce = introduce;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public double getVipprice() {
            return vipprice;
        }

        public void setVipprice(double vipprice) {
            this.vipprice = vipprice;
        }

        public Sid1Bean getSid1() {
            return sid1;
        }

        public void setSid1(Sid1Bean sid1) {
            this.sid1 = sid1;
        }

        public Pid1Bean getPid1() {
            return pid1;
        }

        public void setPid1(Pid1Bean pid1) {
            this.pid1 = pid1;
        }

        public int getStock() {
            return stock;
        }

        public void setStock(int stock) {
            this.stock = stock;
        }

        public String getProductId() {
            return productId;
        }

        public void setProductId(String productId) {
            this.productId = productId;
        }

        public static class Sid1Bean implements  Serializable{
            private int id;
            private String name;
            private String url;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getUrl() {
                return url;
            }

            public void setUrl(String url) {
                this.url = url;
            }
        }

        public static class Pid1Bean implements  Serializable{
            private int id;
            private String name;
            private String url;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getUrl() {
                return url;
            }

            public void setUrl(String url) {
                this.url = url;
            }
        }
    }
}
